<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">月度对账单</h2>
    </div>
    <!-- 标题 -->
    <div >
    <form action="#" method="post" class="form-inline">
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td>
               <div class="form-group">
                     <label for="" class="form-label">二级考核期</label>
                     <select name="cainian" id="cainian" style="min-width: 140px;width: 140px" class="form-control">
                            {volist name="cainian" id="se"}
                              {if $data.cainian==$se.id}
                              <option value="{$se.id}" selected>{$se.title}</option>
                              {else/}
                                <option value="{$se.id}">{$se.title}</option>
                              {/if}
                            {/volist}
                     </select>
                      <select name="kaohe1" id="kaohe1" style="min-width: 140px;width: 140px" class="form-control">
                            {volist name="kaohe1" id="se"}
                            {if $data.kaohe1==$se.id}
                             <option pid="{$se.cid}" value="{$se.id}" selected>{$se.title}</option>
                            
                            {else/}
                            <option pid="{$se.cid}" value="{$se.id}">{$se.title}</option>
                            {/if}
                            {/volist}
                     </select>
                        <select name="kaohe2" id="kaohe2" style="min-width: 140px;width: 140px" class="form-control">
                             {volist name="kaohe2" id="se"}
                             
                         
                             {if $data.kaohe2==$se.id}
                             <option pid="{$se.pid}" value="{$se.id}" selected>{$se.title}</option>
                             {else/}
                            <option pid="{$se.pid}" value="{$se.id}">{$se.title}</option>
                            {/if}
                            {/volist}
                     </select>
               </div>
                 <input type="submit" class="btn btn-info query" value="查询"/>
                 <button class="btn btn-info LendExcel" type="button">导出Excel</button>
            </td>
          </tr>
      </table>
    
      <table class="table table-striped row-margin-top table-bordered text-right bud_hei">
          <tr>
            <th class="text-right" colspan="16">单位：元</th>
          </tr>
          <tr class="info">
            <th class="text-center">月份</th>
            <th class="text-center">类型</th>
            <th class="text-center">当月预提</th>
            <th class="text-center">累计预提</th>
            <th class="text-center">当月核销</th>
            <th class="text-center">累计核销</th>
            <th class="text-center">当月支付</th>
            <th class="text-center">累计支付</th>
            <th class="text-center">当月预付</th>
            <th class="text-center">累计预付</th>
            <th class="text-center">当月预付转支付</th>
            <th class="text-center">累计预付转支付</th>
            <th class="text-center">当月预付余额</th>
            <th class="text-center">累计预付余额</th>
            <th class="text-center">当月预提余额</th>
            <th class="text-center">累计预提余额</th>
          </tr>
          <tr>
            <td class="text-center">{$ctitle}-{$k2title}</td>
            <td class="text-center">TI</td>
            <td class="thisPreT"><a class="ObjectNum num2 jisuan1" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}" >{$Tidangyue}</a></td>
            <td class="totalPreT"><a class="ObjectNum num2 jisuan2" href="{:url('leijiti')}">{$Tileiji}</a></td>
            <td class="thisVerify"><a class="ObjectNum num2 jisuan3" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$dangtihexiao}</a></td>
            <td class="totalVerify"><a class="ObjectNum num2 jisuan4" href="{:url('leijiti')}">{$Tiallhexiao}</a></td>
            <td class="thisPay"><a class="ObjectNum num2 jisuan5" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$tidangyuezf}</a></td>
            <td class="totalPay"><a class="ObjectNum num2 jisuan6" href="{:url('leijiti')}">{$tiallzf}</a></td>
            <td class="thisPrePay"><a class="ObjectNum num2 jisuan7" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$tidangy}</a></td>
            <td class="totalPrePay"><a class="ObjectNum num2 jisuan8" href="{:url('leijiti')}">{$tially}</a></td>
            <td class="thisPrePaytoPay"><a class="ObjectNum num2 jisuan9" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$tidangzhuan}</a></td>
            <td class="totalPrePaytoPay"><a class="ObjectNum num2 jisuan10" href="{:url('leijiti')}">{$tiallzhuan}</a></td>
            <td class="thisPrePayBlc"><a class="ObjectNum num2 jisuan11" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$tidangsy}</a></td>
            <td class="totalPrePayBlc"><a class="ObjectNum num2 jisuan12" href="{:url('leijiti')}">{$tiallsy}</a></td>
            <td class="thisPreTBlc"><a class="ObjectNum num2 jisuan13" href="{:url('dangyueti')}?kaohe2={$data.kaohe2}">{$tidangsyyt}</a></td>
            <td class="totalPreTBlc"><a class="ObjectNum num2 jisuan14" href="{:url('leijiti')}">{$tileijisyyt}</a></td>
          </tr>
           <tr>
            <td class="text-center">{$ctitle}-{$k2title}</td>
            <td class="text-center">AP</td>
            <td class="thisPreT1"><a class="ObjectNum num2 jisuan1" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$Apdangyue}</a></td>
            <td class="totalPreT1"><a class="ObjectNum num2 jisuan2" href="{:url('leijiap')}">{$Apleiji}</a></td>
            <td class="thisVerify1"><a class="ObjectNum num2 jisuan3" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$dangyueaphe}></a></td>
            <td class="totalVerify1"><a class="ObjectNum num2 jisuan4" href="{:url('leijiap')}">{$Apallhexiao}</a></td>
            <td class="thisPay1"><a class="ObjectNum num2 jisuan5" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$apdangzf}</a></td>
            <td class="totalPay1"><a class="ObjectNum num2 jisuan6" href="{:url('leijiap')}">{$apallzf}</a></td>
            <td class="thisPrePay1"><a class="ObjectNum num2 jisuan7" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$dangyueapyu}</a></td>
            <td class="totalPrePay1"><a class="ObjectNum num2 jisuan8" href="{:url('leijiap')}">{$apyufu}</a></td>
            <td class="thisPrePaytoPay1"><a class="ObjectNum num2 jisuan9" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$apdangyuezhuan}</a></td>
            <td class="totalPrePaytoPay1"><a class="ObjectNum num2 jisuan10" href="{:url('leijiap')}">{$apzhuan}</a></td>
            <td class="thisPrePayBlc1"><a class="ObjectNum num2 jisuan11" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$dangyuapyy}</a></td>
            <td class="totalPrePayBlc1"><a class="ObjectNum num2 jisuan12" href="{:url('leijiap')}">{$apshengyu}</a></td>
            <td class="thisPreTBlc1"><a class="ObjectNum num2 jisuan13" href="{:url('dangyueap')}?kaohe2={$data.kaohe2}">{$apdangyueyts}</a></td>
            <td class="totalPreTBlc1"><a class="ObjectNum num2 jisuan14" href="{:url('leijiap')}">{$apleijiyue}</a></td>
          </tr>
          <tr class="trTotal">
            <td colspan="2" class="text-right">合计</td>
            <td class="thisPreTz "><a class="ObjectNum zonghe1" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPreTz"><a class="ObjectNum zonghe2" href="{:url('leijiall')}"></a></td>
            <td class="thisVerifyz"><a class="ObjectNum zonghe3" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalVerifyz "><a class="ObjectNum zonghe4" href="{:url('leijiall')}"></a></td>
            <td class="thisPayz "><a class="ObjectNum zonghe5" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPayz "><a class="ObjectNum zonghe6" href="{:url('leijiall')}"></a></td>
            <td class="thisPrePayz "><a class="ObjectNum zonghe7" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPrePayz"><a class="ObjectNum zonghe8" href="{:url('leijiall')}"></a></td>
            <td class="thisPrePaytoPayz"><a class="ObjectNum zonghe9" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPrePaytoPayz"><a class="ObjectNum zonghe10" href="{:url('leijiall')}"></a></td>
            <td class="thisPrePayBlcz"><a class="ObjectNum zonghe11" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPrePayBlcz"><a class="ObjectNum zonghe12" href="{:url('leijiall')}"></a></td>
            <td class="thisPreTBlcz"><a class="ObjectNum zonghe13" href="{:url('dangyueall')}?kaohe2={$data.kaohe2}"></a></td>
            <td class="totalPreTBlcz"><a class="ObjectNum zonghe14" href="{:url('leijiall')}"></a></td>
          </tr>
      </table>
      <table class="row-margin-top colorRed" style="margin-left: 10px">
            <tr>
            <td>说明：</td>
            </tr>
            <tr>
            <td>当月预提 = 批复通过分摊到当前月份的费用额</td>
            </tr>
             <tr>
            <td>累计预提 = 累计批复通过的费用额</td>
            </tr>
             <tr>
            <td>当月核销 = 当月已有发票的核销额+当月补发票的核销额</td>
            </tr>
             <tr>
            <td>累计核销 = 累计已有发票的核销额+补发票的核销额</td>
            </tr>
             <tr>
            <td>当月支付 = 当月有发票支付额+当月无发票支付额</td>
            </tr>
             <tr>
            <td>累计支付 = 累计有发票支付额+无发票支付额</td>
            </tr>
            <tr>
            <td>当月预付 = 当月无发票核销额</td>
            </tr>
            <tr>
            <td>累计预付 =累计无发票核销额</td>
            </tr>
             <tr>
            <td>当月预付转支付 =当月收到的补发票额</td>
            </tr> 
            <tr>
            <td>累计预付转支付 =累计收到的补发票额</td>
            </tr>
            <tr>
            <td>当月预付余额 =当月预存-当月预存转支付</td>
            </tr>
            <tr>
            <td>累计预付余额 =累计预存-累计预存转支付</td>
            </tr>
             <tr>
            <td>当月预提余额 =当月预提-当月核销</td>
            </tr>
            <tr>
            <td>累计预提余额 =累计预提-累计核销</td>
            </tr>
      </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>
    <script>
    $(".LendExcel").click(function(){
      window.open("{:url('monthdaochu')}?kaohe2={$data.kaohe2}");
    })
    //三级联动
    $("#cainian").change(function(){
        var cid=$("#cainian").val();
      $("#kaohe1>option[pid='"+cid+"']").show();
      $("#kaohe1>option[pid!='"+cid+"']").hide();
      $("#kaohe1>option[pid='"+cid+"']").eq(0).prop("selected",true);
      var k1= $("#kaohe1").val();
      $("#kaohe2>option[pid='"+k1+"']").show();
      $("#kaohe2>option[pid!='"+k1+"']").hide();
      $("#kaohe2>option[pid='"+k1+"']").eq(0).prop("selected",true);
    })
    $("#kaohe1").change(function(){
      var k1= $("#kaohe1").val();
      $("#kaohe2>option[pid='"+k1+"']").show();
      $("#kaohe2>option[pid!='"+k1+"']").hide();
      $("#kaohe2>option[pid='"+k1+"']").eq(0).prop("selected",true);
    })
    //开启隐藏
    function hiddens(){
      var cid=$("#cainian").val();
      $("#kaohe1>option[pid='"+cid+"']").show();
      $("#kaohe1>option[pid!='"+cid+"']").hide();
   
      var k1= $("#kaohe1").val();
      $("#kaohe2>option[pid='"+k1+"']").show();
      $("#kaohe2>option[pid!='"+k1+"']").hide();
    }
            $(document).ready(function(){
              hiddens();
               $(".num2").each(function(){
                if(!isNaN(parseFloat($(this).html())))
                 var num=parseFloat($(this).html()).toFixed(2);
                else
                    var num="0.00";
                $(this).html(num);
            })
               for(var i=1;i<=14;i++){
                var zonghe=0;
                  $(".jisuan"+i).each(function(){
                    zonghe+=parseFloat($(this).html());
                  })
                  $(".zonghe"+i).html(zonghe.toFixed(2));
               }
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);

      
        })
    </script>
</body>

</html>
